
=== SYNOPSIS ===
{{{
#include <xp/bas/string.h>

xp_char_t* xp_strdup (const xp_char_t* str);
xp_char_t* xp_strxdup (const xp_char_t* str, xp_size_t len);
}}}

=== DESCRIPTION ===
'''''xp_strdup()''''' duplicates the null-terminated string '''''str''''' and returns the pointer to the duplicated string if sufficient amount of memory was available. Otherwise, it returns XP_NULL. The memory pointed by the returned value should be freed with '''''xp_free()'''''.

'''''xp_strxdup()''''' is similar to '''''xp_strdup()''''' except it duplicates the string pointed by '''''str''''' of the length '''''len'''''.
